All Questions
45 questions
2votes
1answer
108views
Move timestamp to the next Monday 10:01 AM [closed]
I've been battling ChatGPT for hours now and can't get satisfied with this simple algorithm in TypeScript. These two (hopefully correct) TypeScript+ReactNative solutions should move the timestamp ...
3votes
1answer
134views
6votes
4answers
3kviews
Find all letter Combinations of a Phone Number
The task is taken from LeetCode Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. A mapping of digit to letters (just ...
2votes
1answer
757views
Given time intervals determine if a person could attend all meetings
The task is taken from LeetCode Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] ...
1vote
1answer
291views
Merge k Sorted Lists
The task is taken from LeetCode Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example: ...
8votes
1answer
2kviews
Merge Intervals in JavaScript
This is a task taken from Leetcode - Given a collection of intervals, merge all overlapping intervals. Example 1: ...
2votes
1answer
2kviews
Find common characters (LeetCode)
The task is taken from leetcode Given an array A of strings made only from lowercase letters, return a list of all characters that show up in all strings within the list (including duplicates). ...
3votes
2answers
898views
Robot Return to Origin
The task is taken from leetcode There is a robot starting at position (0, 0), the origin, on a 2D plane. Given a sequence of its moves, judge if this robot ends up at (0, 0) after it completes ...
1vote
2answers
118views
Flipping an Image
The task is taken from leetcode Given a binary matrix A, we want to flip the image horizontally, then invert it, and return the resulting image. To flip an ...
1vote
1answer
530views
Sort Array By Parity
The task is taken from leetcode Given an array A of non-negative integers, return an array consisting of all the even elements of A, followed by all the odd elements of A. You may return any ...
0votes
1answer
52views
Items also occurs in a set
The task You're given strings J representing the types of stones that are jewels, and S representing the stones you have. Each character in S is a type of stone you have. You want to know how ...
2votes
0answers
733views
Determine whether there exists a one-to-one character mapping from one string to another
The task Determine whether there exists a one-to-one character mapping from one string s1 to another s2. For example, given s1 = abc and s2 = bcd, return true since we can map a to b, b to c, and c ...
1vote
2answers
1kviews
Sum of two numbers in array
The task You are given two non-empty arrays representing two non-negative integers. The digits are stored in reverse order and each of their items contain a single digit. Add the two numbers and ...
1vote
1answer
1kviews
Find busiest period in building
The task You are given a list of data entries that represent entries and exits of groups of people into a building. An entry looks like this: {"timestamp": 1526579928, count: 3, "type": "...
0votes
1answer
867views
Find indices of two numbers such that they add up to a target
The task ...is taken from leetcode Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly ...